<?php

/*
|--------------------------------------------------------------------------
| 应用程序前台路由
|--------------------------------------------------------------------------
*/

Route::get('/home','Home\IndexController@index');

Route::group(['middleware' => 'auth'], function () {
    
    // 文章路由
    Route::get('/article','Home\ArticleController@index');
    Route::get('/article/view-{id?}.html','Home\ArticleController@show');
    Route::get('/article/create','Home\ArticleController@create');
    Route::post('/article/store','Home\ArticleController@store');
    Route::get('/article/edit-{id?}.html','Home\ArticleController@edit');
    Route::post('/article/update/{id?}','Home\ArticleController@update');
    Route::get('/article/delete-{id?}.html','Home\ArticleController@destroy');
    
    // 商品路由
    Route::get('/goods','Home\GoodsController@index');
    Route::get('/goods/view-{id?}.html','Home\GoodsController@show');
    Route::get('/goods/create','Home\GoodsController@create');
    Route::post('/goods/store','Home\GoodsController@store');
    Route::get('/goods/edit-{id?}.html','Home\GoodsController@edit');
    Route::post('/goods/update/{id?}','Home\GoodsController@update');
    Route::get('/goods/delete-{id?}.html','Home\GoodsController@destroy');
    
});
